<template>
    <div class="content">
        <div class="box">
            <img class="pic" :src="data.coverImgUrl" alt="">
            <div class="num">{{data.playCount | handleCount}}</div>
        </div>
        <div class="title">{{data.name}}</div>
    </div>
</template>

<script>
    export default {
        name:"MusicItem",
        props:{
            data:{
                type:Object
            }
        }
    }
</script>

<style scoped>
.content{
    margin-right: 30px;
    margin-bottom: 20px;
}
.pic{
    width:150px;
    height: 150px;
    border-radius: 20px;
}
.title{
    width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.box{
    position: relative;
}
.num{
    background-color: rgba(0,0, 0, 0.3);
    width:60px;
    border-radius: 10px;
    text-align: center;
    position: absolute;
    right: 10px;
    top: 10px;
    color: white;
}
</style>